import React, { Component, PureComponent } from 'react'
class Children1 extends PureComponent{
  render() {
    console.log('children1 rendering!!!')
    return (
      <div>double: {this.props.double}</div>
    )
  }
}
export default class Father extends Component{
  state = {
    count: 0
  }
  add = () => {
    this.setState(state => state.count++)
  }
  render() {
    return (
      <>
        <div>count: {this.state.count}</div>
        <div>
          <button onClick={this.add}>add</button>
        </div>
        <div>
          <Children1 double={1} />
        </div>
      </>
    )
  }
}